load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "leaktestcall",
    srcs = ["leaktestcall.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/testutils/lint/passes/leaktestcall",
    visibility = ["//visibility:public"],
    deps = [
        "@org_golang_x_tools//go/analysis",
        "@org_golang_x_tools//go/analysis/passes/inspect",
        "@org_golang_x_tools//go/ast/inspector",
    ],
)

go_test(
    name = "leaktestcall_test",
    srcs = ["leaktestcall_test.go"],
    data = glob(["testdata/**"]) + [
        "@go_sdk//:files",
    ],
    deps = [
        ":leaktestcall",
        "//pkg/build/bazel",
        "//pkg/testutils/datapathutils",
        "//pkg/testutils/skip",
        "@org_golang_x_tools//go/analysis/analysistest",
    ],
)
